<template>
	<view class="content">
		<u-navbar title-color="#FFFFFF" height="48" back-icon-color="#FFFFFF" :is-fixed="true"  title="视频通话" back-text="返回"></u-navbar>
		<view style="padding: 20rpx;">
			<u-form :model="videoForm" :rules="rules" ref="uForm" :errorType="errorType">
				<u-form-item  label-width="120" :label-position="labelPosition" label="昵称" prop="disPlayName">
					<u-input :border="false" placeholder="请输入昵称" v-model="videoForm.disPlayName" type="text"></u-input>
				</u-form-item>
				<u-form-item  label-width="120" :label-position="labelPosition" label="频道号" prop="channelId">
					<u-input :border="false" placeholder="请输入频道" v-model="videoForm.channelId" type="text"></u-input>
				</u-form-item>
			</u-form>
			<u-button style="margin-top: 30rpx;" type="primary" @click="joinChannel">加入</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				labelPosition: 'left',
				videoForm:{
					disPlayName:"",
					channelId:""
				},
				errorType: ['message'],
				rules:{
					disPlayName: [
						{
							required: true,
							message: '请输入昵称',
							trigger: 'blue'
						}
					],
					channelId: [
						{
							required: true,
							message: '请输入频道',
							trigger: 'blue'
						}
					],
				}
			}
		},
		methods: {
			joinChannel(){
				window.native.joinChannel(this.videoForm)
			}
		}
	}
</script>

<style>

</style>
